<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    var date=new Date()
    function time(){
        var year=date.getFullYear();
        var m=date.getMonth();
        var day=date.getDate();
        var xq=date.getDay()
        var arr='日一二三四五六'
        var sj=date.toLocaleString().split(' ')
        return`${year}年${m+1}月${day}日 星期${arr[xq]} ${sj[1]}`;
    }
    console.log(time());
    
</script>